<?php
//DB Created by Rich L. a member in service in Northern Delaware.  Should you have questons please contact me at sobernerd@gmail.com
require_once ('config/include_paths.php');
require_once('load.php');
if ( file_exists( 'config/config.php') ) {
require_once ('functions.php');
require_once('dbconnect.php');	// database connect script.
$pageTitle = SITE_NAME.' - Home'; //must be set after the config.php include and before head.php include
require_once ('head.php'); 
//select and order home page modules
$page_id = 1; //home=1 contacts=4
$query  = "SELECT * FROM modules
				WHERE page_id = $page_id and enabled = 1
				ORDER BY record_order ASC";
	$result = mysql_query($query);	
?>

<body>
<div id="wrapper">
  <?php require_once ('header.php'); ?>
  <div id="content">
  	<?php while($row = mysql_fetch_array($result, MYSQL_ASSOC))
	{?>
        <div class="module">
            <h2><?php echo $row['title'];?></h2>
            <?php // now get content for module
            if ($row['system_module'] == NULL || $row['system_module'] == '')
            { echo $row['editHTML']; } ?>
        </div>
	<?php }?>  
  </div>
  <div class="clearfloat">&nbsp;</div>
</div>
</body>
</html>
<?php } ?>